package com.example.birdfriends.utils.verifyCode;

import com.example.birdfriends.pojo.post.PostFront;

import java.io.File;
import java.sql.Timestamp;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;

public class Test {
    public static void main(String[] args) throws ParseException {
        Timestamp timestamp = new Timestamp(System.currentTimeMillis());
        System.out.println(timestamp.toString());

        Date date = Date.from(timestamp.toInstant());
        SimpleDateFormat df = new SimpleDateFormat("yyy-MM-dd hh:mm:ss");
        String formatTime = df.format(date);
        System.out.println(formatTime);

        Timestamp timestamp1 = Timestamp.valueOf(formatTime);
        System.out.println(timestamp1.toString());
    }
}
